package com.skyline.attraction.service;

import java.util.List;

import com.skyline.attraction.model.Attraction;
import com.skyline.attraction.type.AttractionType;
import com.skyline.attraction.type.SiteType;
import com.skyline.base.type.Activity;
import com.skyline.common.bean.Page;
import com.skyline.user.model.User;

public interface AttractionService {

	/**
	 * 创建点
	 * 
	 * @param user
	 *            创建者
	 * @param attraction
	 *            点信息
	 * @return
	 */
	public Long discoveryAttraction(User user, Attraction attraction);

	/**
	 * 更新点信息
	 * 
	 * @param attraction
	 */
	public void updateAttractionInfo(Attraction attraction, Long adminId);

	/**
	 * 更新点说明函数，由于点的描述更新的比较平凡，所以单独提出
	 * 
	 * @param attractionId
	 * @param introduction
	 * @param adminId
	 */
	public void updateAttractionIntroduction(Long attractionId, String introduction, Long adminId);

	/**
	 * 更新点说明函数，由于点的描述更新的比较平凡，所以单独提出
	 * 
	 * @param attractionId
	 * @param portrait
	 */
	public void updateAttractionPortrait(Long attractionId, String portrait);


	/**
	 * 更改点管理员
	 * 
	 * @param attractionId
	 * @param user
	 */
	public void changeAdministrator(Long attractionId, User oldAdministrator, User newAdministrator);

	/**
	 * 点浏览函数，用于显示点主页
	 * 
	 * @param attractionId
	 * @return
	 */
	public Attraction viewAttraction(Long attractionId, Long viewerId, boolean addVisitCount);

	/**
	 * 获取Attraction
	 * 
	 * @param attractionId
	 * @return
	 */
	public Attraction getAttractionForChange(Long attractionId, Long adminId);
	
	/**
	 * 获取状态为NORMAL的Attraction
	 * 
	 * @param attractionId
	 * @return
	 */
	public Attraction getNormalAttraction(Long attractionId);

	/**
	 * 删除
	 * 
	 * @param attractionId
	 */
	public void deleteAttraction(Long attractionId);

	/**
	 * 判断是否存在同名
	 * 
	 * @param attractionName
	 * @return
	 */
	public boolean isExist(String attractionName);


	/**
	 * 根据名称，城市查找
	 * 
	 * @param name
	 * @return
	 */

	public List<Attraction> findByName(String name, AttractionType type, Activity activity);

	/**
	 * 根据类型查找所有景点
	 * 
	 */
	public List<Attraction> listAttractions(String siteId, SiteType siteType, AttractionType type, Page page);

}
